Skip to content

Conversation

@jadechoghari
Copy link
Member

@jadechoghari jadechoghari commented Oct 6, 2025

What this does

feat(sim): allow loading envs from the hub
This allow people to upload environments on the hub, then easily load them.
from lerobot import make_env
For instance:
https://huggingface.co/jadechoghari/cartpole-env
Can be loaded as such

from lerobot.envs.factory import make_env
env1 = make_env("jadechoghari/cartpole-env", trust_remote_code=True)
print(env1)

This design unlocks a powerful new model for collaboration. Instead of environments being locked away inside monolithic libraries, anyone can publish an env.py to the Hugging Face Hub, from simple toy tasks to large-scale, GPU-accelerated simulation worlds, and you can load them instantly with a single line of code.

Over time, as more contributors share their work, the ecosystem of simulation environments will grow richer and more diverse. You can imagine a future where researchers push increasingly complex environments, physics-rich manipulation tasks, multi-agent worlds, photorealistic scenes, and they just work with the same LeRobot make_env() API.

Copilot AI review requested due to automatic review settings October 6, 2025 07:53
@jadechoghari jadechoghari self-assigned this Oct 6, 2025
@jadechoghari jadechoghari added enhancement Suggestions for new features or improvements simulation Matters involving system simulation or modeling labels Oct 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for loading environments from the Hugging Face Hub in addition to the existing local environment creation. Users can now specify a Hub repository string to dynamically load and execute environment code from remote repositories.

Key changes:

  • Added hub URI parsing to support flexible repository and file path specifications
  • Implemented dynamic module loading for Hub-downloaded Python files
  • Enhanced the make_env function to handle both local and Hub environments with comprehensive error handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jadechoghari jadechoghari added the python Pull requests that update python code label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Suggestions for new features or improvements python Pull requests that update python code simulation Matters involving system simulation or modeling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant